package jeecg.business.service.impl.loginuser;

import java.util.List;

import jeecg.business.entity.loginuser.LoginUserEntity;
import jeecg.business.service.loginuser.LoginUserServiceI;

import org.jeecgframework.core.common.service.impl.CommonServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service("loginUserService")
@Transactional
public class LoginUserServiceImpl extends CommonServiceImpl implements LoginUserServiceI {
	public LoginUserEntity getRandom(String nmlx){
		String hql = " from LoginUserEntity where lx = '"+nmlx+"' order by rand() ";
		List<LoginUserEntity> list = findByQueryString(hql, 0, 1);
		if(list != null) return list.get(0);
		return null;
	}
}